/// @tags: ACAutoMaton DP Matrix
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#define rint register int

using std::cin;
using std::cout;

namespace BlueQuantum {

typedef long long LL;

constexpr int MAXN = 1e2 + 3, CHARSET = 26, P = 1e9 + 7;

int n, m, l, accnt;
int ch[MAXN][CHARSET], fail[MAXN], end[MAXN], len[MAXN], f[MAXN][MAXN];
char base[MAXN][MAXN], str[MAXN];

inline void insert(char str[]) {
  int cur = 0, length = strlen(str + 1);
  for (int i = 1; i <= length; ++i) {
    int c = str[i] - 'a';
    if (ch[cur][c] == 0) ch[cur][c] = ++accnt;
    cur = ch[cur][c];
  }
  end[cur] = true;
}

inline void getFail() {
  std::queue<int> q;
  for (int i = 0; i < CHARSET; ++i) {
    if (ch[0][i]) q.push(ch[0][i]);
  }
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int i = 0; i < CHARSET; ++i) {
      int v = ch[u][i];
      if (v) {
        q.push(v);
        fail[v] = ch[fail[u]][i];
        end[v] = end[v] | end[fail[v]];
      } else {
        ch[u][i] = ch[fail[u]][i];
      }
    }
  }
}

inline void trans(int &p, int c) { p = end[ch[p][c]] ? -1 : ch[p][c]; }

inline int inc(int a, int b) {
  a += b;
  return a >= P ? a - P : a;
}

struct Matrix;

struct Vector {
  static int n;
  int a[MAXN * 2];

  Vector() { memset(a, 0, sizeof(a)); }

  inline int &operator[](int index) { return a[index]; }
  inline const int &operator[](int index) const { return a[index]; }

  Vector operator*(const Matrix &rhs) const;
};

struct Matrix {
  static int n;
  Vector a[MAXN * 2];

  inline Matrix(int x = 0) {
    for (rint i = 0; i < n; ++i) a[i][i] = x;
  }

  inline Vector &operator[](int index) { return a[index]; }
  inline const Vector &operator[](int index) const { return a[index]; }

  Matrix operator*(const Matrix &rhs) const;
  Matrix operator^(int exp) const;
} A, T;

int Vector::n, Matrix::n;

inline Vector Vector::operator*(const Matrix &rhs) const {
  Vector res;
  for (rint i = 0; i < n; ++i)
    for (rint j = 0; j < n; ++j) res[i] = inc(res[i], (LL)a[j] * rhs[j][i] % P);
  return res;
}

inline Matrix Matrix::operator*(const Matrix &rhs) const {
  Matrix res;
  for (rint i = 0; i < n; ++i) res[i] = a[i] * rhs;
  return res;
}

inline Matrix Matrix::operator^(int exp) const {
  Matrix res(1), base(*this);
  for (; exp; exp >>= 1, base = base * base)
    if (exp & 1) res = res * base;
  return res;
}

inline int main() {
  cin >> n >> m >> l;
  for (int i = 1; i <= n; ++i) {
    cin >> (base[i] + 1);
    len[i] = strlen(base[i] + 1);
  }
  for (int i = 1; i <= m; ++i) {
    cin >> (str + 1);
    insert(str);
  }
  getFail();
  Vector::n = Matrix::n = accnt * 2 + 1;
  if (l <= 100) {
    f[0][0] = 1;
    for (int i = 0; i <= l; ++i) {
      for (int j = 0; j <= accnt; ++j) {
        for (int k = 1; k <= n; ++k) {
          if (i + len[k] <= l) {
            int cur = j;
            for (int h = 1; h <= len[k] && cur != -1; ++h) trans(cur, base[k][h] - 'a');
            if (cur != -1) f[i + len[k]][cur] = inc(f[i + len[k]][cur], f[i][j]);
          }
        }
      }
    }
    int res = 0;
    for (int i = 0; i <= accnt; ++i) res = inc(res, f[l][i]);
    cout << res;
  } else {
    A[0][accnt + 1] = 1;
    for (int i = 0; i <= accnt; ++i) T[accnt + i + 1][i] = 1;
    for (int i = 0; i <= accnt; ++i) {
      for (int j = 1; j <= n; ++j) {
        int cur = i;
        switch (len[j]) {
          case 1:
            if (end[cur]) continue;
            trans(cur, base[j][1] - 'a');
            if (cur != -1) T[accnt + i + 1][accnt + cur + 1]++;
            break;
          case 2:
            if (end[cur]) continue;
            trans(cur, base[j][1] - 'a');
            if (cur == -1) continue;
            trans(cur, base[j][2] - 'a');
            if (cur != -1) T[i][accnt + cur + 1]++;
            break;
        }
      }
    }
    A = A * (T ^ l);
    int res = 0;
    for (int i = 0; i <= accnt; ++i) res = inc(res, A[0][accnt + i + 1]);
    cout << res;
  }
  return 0;
}

}  // namespace BlueQuantum

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("P3715 [BJOI2017] 魔法咒语.in", "r", stdin);
  freopen("P3715 [BJOI2017] 魔法咒语.out", "w", stdout);
#endif
#endif

  std::ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  return BlueQuantum::main();
}
